package problems;

import java.math.BigInteger;

import lib.MathLib;

public class Euler053 extends AbstractEuler {

	@Override
	public Number calculate() {
		int valuesAboveOneMillion = 0;
		for (int n = 1; n <= 100; n++) {
			for (int c = 1; c <= n; c++) {
				if (MathLib.choose(c, n).compareTo(BigInteger.valueOf(1000000)) > 0) {
					valuesAboveOneMillion++;
				}
			}
		}
		return valuesAboveOneMillion;
	}

	@Override
	protected Number getCorrectAnswer() {
		return 4075;
	}

}
